package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.domain.AdminRoleRelation;
import com.itheima.mapper.AdminRoleRelationMapper;
import com.itheima.service.IAdminRoleRelationService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 后台用户和角色关系表 服务实现类
 * </p>
 *
 * @author fukeke
 * @since 2022-11-11
 */
@DubboService
public class AdminRoleRelationServiceImpl extends ServiceImpl<AdminRoleRelationMapper, AdminRoleRelation> implements IAdminRoleRelationService {
    @Autowired
    AdminRoleRelationMapper adminRoleRelationMapper;
    @Override
    public List<AdminRoleRelation> findByAdminId(Long id) {

        LambdaQueryWrapper<AdminRoleRelation> qw=new LambdaQueryWrapper<>();
        qw.eq(AdminRoleRelation::getAdminId,id);

        return adminRoleRelationMapper.selectList(qw);
    }
}
